package com.jwdf.uda.http.action;

import android.content.Context;

import com.jwdf.uda.bean.PbBean;
import com.jwdf.uda.http.AHttpService;
import com.jwdf.uda.http.ApiService;

import retrofit2.Call;

/**
 * Created by Administrator on 2016/9/18.
 */
public class ReplyDelAction extends AHttpService<PbBean.PbResQuestionDelAnswer> {
    private int answerId;

    private ReplyDelAction(Context context, int answerId) {
        super(context);
        this.answerId = answerId;
    }

    public static ReplyDelAction newInstance(Context context, int answerId) {
        return new ReplyDelAction(context, answerId);
    }

    @Override
    protected Call newRetrofitCall(ApiService apiService, PbBean.PbBaseClientInfo.Builder baseBuilder) {
        PbBean.PbReqQuestionDelAnswer.Builder builder = PbBean.PbReqQuestionDelAnswer.newBuilder();
        builder.setBaseClientInfo(baseBuilder);
        builder.setAnswerId(answerId);

        return apiService.quizReplyDel(builder.build());
    }
}
